package coml.jiyun.hp.reviewtopic.model;


import coml.jiyun.hp.reviewtopic.base.BaseModel;
import coml.jiyun.hp.reviewtopic.bean.NaviBean;
import coml.jiyun.hp.reviewtopic.net.HttpUtil;
import coml.jiyun.hp.reviewtopic.net.ResultCallBack;
import coml.jiyun.hp.reviewtopic.net.ResultSubscriber;
import coml.jiyun.hp.reviewtopic.net.RxUtils;

public class NaviModel extends BaseModel {
    public void getNavi(final ResultCallBack<NaviBean> callBack){
        addDisposable(HttpUtil.getInstance()
        .getNaviServer()
        .getNavi()
        .compose(RxUtils.<NaviBean>rxSchedulerHelper())
        .subscribeWith(new ResultSubscriber<NaviBean>() {
            @Override
            public void onNext(NaviBean naviBean) {
                callBack.onSuccess(naviBean);
            }
        }));
    }
}
